<!-- 默认插槽定制内容
具名 extra插槽定制按钮
props传递title -->
<template>
  <el-card class="page-container">
    <template #header>
      <div class="header">
        <span>{{ title }}</span>
        <div class="extra">
          <slot name="extra"></slot>
        </div>
      </div>
    </template>
    <slot> </slot>
  </el-card>
</template>
<script lang="ts" setup name="">
import {} from 'vue'

//接收title  需要使用的组件 将title通过属性传递
defineProps({
  title: {
    required: true,
    type: String
  }
})
</script>
<style scoped lang="scss">
.page-container {
  min-height: 100%;
  box-sizing: border-box;
}
.page-container .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
